# /FK/M300_0/hit

from pb.ros.geometry_msgs import Pose_pb2
from pb.ros.geometry_msgs import PoseStamped_pb2
from pb.ros.nav_msgs import Odometry_pb2
from pb.ros.visualization_msgs import Marker_pb2
from pb.ros.geometry_msgs import Point_pb2
from pb.ros.std_msgs import Bool_pb2
import proxy

import os
import time
import math
import threading
import sys

node = proxy.Connector('tcp://172.22.56.12:15555')  # 在709的电脑上使用该IP

def callback_crash(is_crash):
    print(is_crash)

# subcribe_dp = node.Subscribe('FK', 'M300_0', '/FK/M300_0/hit', std_msgs/Bool, callback_dp)  # 期望位置控制指令---相对于起点位置

subcribe_crash = node.Subscribe('FK', 'M300_0', '/FK/M300_0/hit', Bool_pb2.Bool, callback_crash)

def sub_dp():
	while 1:
		subcribe_crash.SpinOnce()


sub_dp()

